<%= form_for @product, :url => products_path do |f| %>

  <%= f.label :product_name, "品名" %>
  <%= f.text_field :product_name %>

  <%= f.label :product_img_path, "图片" %>
  <%= f.text_field :product_img_path %>

  <%= f.label :sort_id, "产品分类" %>
  <%= f.select :sort_id, @sort %>

  <%= f.label :product_price, "价格" %>
  <%= f.text_field :product_price %>

  <%= f.label :product_count, "库存" %>
  <%= f.number_field :product_count, :min => 0 %>

  <%= f.label :product_origin, "产地" %>
  <%= f.text_field :product_origin %>

  <%= f.label :date_of_production, "出厂日期" %>
  <%= f.date_select :date_of_production, :start_year => 1995, :end_year => 2020 %>

  <%= f.label :product_descirbe, "产品描述" %>
  <%= f.text_area :product_descirbe %>

  <br />
  <%= f.submit "确认", class: "btn btn-primary" %>
<% end %>